<!DOCTYPE html>
{% load static %}
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Followers_list - DreamLife</title>
    <link rel="icon" type="image/x-icon" href="{% static 'img/icon.ico' %}">
    <style>
        /* CSS样式可以根据需要自行添加 */
        /* 页面居中显示 */
        body {
            background-image: url("{% static 'img/myimg.jpg' %}");
            background-size: cover;
            background-repeat: no-repeat;
            background-attachment: fixed; /* 保持背景图固定不随滚动而移动 */
            background-position: center;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: Arial, sans-serif;
        }
        /* 取消超链接的下划线并将初始字体颜色设置为黑色 */
        .navbar a {
            text-decoration: none;
            color: black;
            border: 1px solid #555; /* 深灰色边框 */
            border-radius: 5px; /* 圆角边框 */
            padding: 5px 10px; /* 按钮内边距 */
            /* 其他样式 */
        }

        /* 点击后保持字体颜色为黑色 */
        a:visited {
            color: black; /* 设置点击后的字体颜色为黑色 */
        }
        /* 整体容器 */
        .container {
            width: 80%; /* 调整宽度 */
            background-color: rgba(255, 255, 255, 0.6); /* 设置背景色并调整透明度 */
            backdrop-filter: blur(10px); /* 添加毛玻璃效果 */
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        /* 导航栏 */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #999;
            color: white;
            padding: 10px 20px;
            border-radius: 4px;
        }
        .navbar button {
            color: white;
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
        .search {
            width: 200px; /* 调整搜索框宽度 */
        }
        /* 用户信息 */
        .user-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }
        .user-info img {
            max-width: 100px;
            border-radius: 50%;
            margin-bottom: 10px;
        }
        /* 用户列表 */
        .user-list {
            margin-top: 20px;
        }
        .user {
            background-color: white;
            padding: 10px;
            margin-bottom: 5px;
            border-radius: 4px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
        }
        /* 用于 user-list 区域的链接样式 */
        .user-link {
            text-decoration: none;
            color: black;
            font-size: 1rem;
            font-family: Arial, sans-serif;
        }

        /* 已访问的链接样式 */
        .user-link:visited {
            color: black;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 导航栏 -->
        <div class="navbar">
            <button><a href="/user/centre/{{ requested_user.username }}">返回</a></button>
            <button><a href="/">首页</a></button>
            <form action="/user/search/" method="GET">
                <input type="text" class="search" placeholder="Search for sth!!!" name="query">
                <button type="submit">搜索</button>
            </form>
            <button><a href="/blog/archieve/{{ requested_user }}">我的博客</a></button>
            <button><a href="/user/centre/{{ requested_user }}">我的主页</a></button>
            <button><a href="/user/edit/">信息编辑</a></button>
            <button><a href="/user/logout/">退出</a></button>

        </div>

        <!-- 主体内容 -->
        <div class="user-info">
            <h1>Followers of {{ requested_user.username }}</h1>
            <h2>粉丝列表</h2>
        </div>

        <div class="user-list">
            {% for follower in followers %}
                <div class="user">
                    <a href="/user/centre/{{ follower.from_user.username }}/" class="user-link">
                        {{ follower.from_user.username }}
                    </a>
                </div>
            {% endfor %}
        </div>

    </div>
</body>
</html>
